<div class="span7">
	<div id="content">

		<h2><?php echo Yii::t('module_file', 'My Files');?></h2>
		<?php
		$this->widget('zii.widgets.grid.CGridView', array(
			'id'=>'files-grid',
			'itemsCssClass'=>'table table-bordered table-striped table-hover',
			'pagerCssClass'=>'pagination',
			'pager'=>array(
				'cssFile' => '',
			),
			'dataProvider'=>$model->search(),
			'columns'=>array(
				array(
					'header' => Yii::t('module_file', 'File'),
					'type' => 'raw',
					'value' => '(empty($data["filename"]))?$data["message"]:CHtml::link($data["filename"], Yii::app()->createAbsoluteUrl("/uploads")."/".$data["recipientId"]."/".$data["filename"], array("target"=>"_blank"))',
				),

				array(
					'name' => Yii::t('module_file', 'Creation Date'),
					'htmlOptions' => array('class'=>'grid-date-column'),
					'sortable' => true,
					'value' => '$data["creationDate"]'
				),

				array(
					'name' => Yii::t('module_file', 'Expiration Date'),
					'htmlOptions' => array('class'=>'grid-date-column'),
					'sortable' => true,
					'value' => '$data["expirationDate"]'
				),

				array(
					'class'=>'CButtonColumn',
					'template'=>'{delete}',
					'deleteConfirmation' => Yii::t('module_file', 'Are you sure you want to delete this file?'),
					'htmlOptions' => array('class'=>'button-column'),
					'buttons' => array(
						'delete' => array(
							'imageUrl' => null,
							'label' => Yii::t('common', 'Delete'),
							'url' => 'Yii::app()->createUrl("file/default/delete", array("id"=>$data["id"]))'
						),
					),
				),
			),
		));
		?>

	</div><!-- content -->
</div>
<div class="span5">
	<div id="sidebar">
		<?php echo $this->renderPartial('_uploadForm', array('model'=>$uploadModel)); ?>
	</div><!-- sidebar -->
</div>